-
Notifications
You must be signed in to change notification settings - Fork 499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support the affinity feature of k8s which define the rule of assigning pods to nodes #475
support the affinity feature of k8s which define the rule of assigning pods to nodes #475
Conversation
/run-e2e-test |
…hen/tidb-operator into set-affinity-direactly
/run-e2e-test |
/run-e2e-test |
…hen/tidb-operator into set-affinity-direactly
charts/tidb-cluster/values.yaml
Outdated
# podAffinityTerm: | ||
# labelSelector: | ||
# matchLabels: | ||
# app.kubernetes.io/instance: <cluster.name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# app.kubernetes.io/instance: <cluster.name> | |
# app.kubernetes.io/instance: <helm release name> |
?
# region: cn-bj1 | ||
# Tolerations are applied to pods, and allow pods to schedule onto nodes with matching taints. | ||
# refer to https://kubernetes.io/docs/concepts/configuration/taint-and-toleration | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a key:
locationLabels:
- region
- zone
- rack
- host
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right,that will be added in other pr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open an issue to track it?
Co-Authored-By: weekface <weekface@gmail.com>
/run-e2e-test |
/run-e2e-test |
docs/operation-guide.md
Outdated
|
||
* CPU & Memory | ||
|
||
The default deployment doesn't set CPU and memory requests or limits for any of the pods, these settings can make TiDB cluster run on a small Kubernetes cluster like DinD or the default GKE cluster for testing. But for production deployment, you would likely to adjust the cpu, memory and storage resources according to the [recommendations](https://github.com/pingcap/docs/blob/master/op-guide/recommendation.md). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/pingcap/docs/blob/master/op-guide/recommendation.md
this link is broken.
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: weekface <weekface@gmail.com>
Co-Authored-By: Tennix <tennix@users.noreply.github.com>
/run-e2e-test |
This is a breaking change. You should add these to
|
/run-e2e-test |
1 similar comment
/run-e2e-test |
|
->
|
@cofyc |
/run-e2e-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* CPU & Memory | ||
|
||
The default deployment doesn't set CPU and memory requests or limits for any of the pods, these settings can make TiDB cluster run on a small Kubernetes cluster like DinD or the default GKE cluster for testing. But for production deployment, you would likely to adjust the cpu, memory and storage resources according to the [recommendations](https://pingcap.com/docs/dev/how-to/deploy/hardware-recommendations/#software-and-hardware-recommendations). | ||
The resource limits should be equal or bigger than the resource requests, it is suggested to set limit and request equal to get [`Guaranteed` QoS]( https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod/#create-a-pod-that-gets-assigned-a-qos-class-of-guaranteed). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a newline above if you want to separate these two paragraph
/run-e2e-test |
2 similar comments
/run-e2e-test |
/run-e2e-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What problem does this PR solve?
affinity
settings and change thenodeSelector
meaningConfiguration
subject for docoperation-guide.md
What is changed and how it works?
Changed the
TidbCluster
struct , add the following fieldto
PDSpec/TiKVSpec/TiDBSpec
and removeNodeSelectorRequired
.tidb-operator directly assigns the above
Affinity
field to pd/tidb/tikv's StatefulSet,and then done.Check List
Tests
Code changes
The following files were changed:
Side effects
Because this PR changed the
TidbcCluster
CRD, so it can not compatible with previous versions.Does this PR introduce a user-facing change?: